package hu.akoel.irrigationcanal;

import hu.akoel.gtk.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.*;
import javax.swing.*;
import java.applet.*;


/**
 * <p>Title: Sticky Building Block</p>
 *
 * <p>Description: Sticky Building Block</p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: n/a</p>
 *
 * @author akoel
 * @version 1.0
 */
public class IrrigationCanal extends JApplet{
    final static int STARTMODE_APPLET = 0;
    final static int STARTMODE_APPLICATION = 1;

    public static void common(int startMode, JApplet appletFrame){
        IrrigationCanalModel model = new IrrigationCanalModel();        
        IrrigationCanalView view = new IrrigationCanalView(model, startMode, appletFrame);
        IrrigationCanalController controller = new IrrigationCanalController(model, view);        
        
    }

    //Alkalmazaskent elinditva
    public static void main(String[] args) {
         SwingUtilities.invokeLater(new Runnable() {
             public void run() {
                 try {
                     UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                 } catch (Exception exception) {
                     exception.printStackTrace();
                 }
                 common(STARTMODE_APPLICATION, null);
             }
         });
    }
    
    //Appletkent lett elinditva
    public void init(){
        common(STARTMODE_APPLET, this);
    }    
    
}
